package cn.ztydata.teachingsystem.heaven.web.dto.questionAnswer;

import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;

/**
 * Created by wl on 2015/3/20.
 */
public class AnswerDto {

    @Min(value = 1, message = "答案ID不合法")
    private Long id; //ID

    private String content; //答案内容

    @Range(min = 0, max = 1, message = "参数不合法")
    private Integer best; //是否为最佳答案（0不是  1是）

    @Min(value = 1, message = "问题ID不合法")
    private Long askId; //问题ID

    private Long userId; //回答人ID

    @Range(min = 0, max = 1, message = "参数不合法")
    private Integer roleId; //回答人角色（0老师  1学生）

    private String time; //创建时间
    private String userName;
    private String photo; //回答者头像

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getBest() {
        return best;
    }

    public void setBest(Integer best) {
        this.best = best;
    }

    public Long getAskId() {
        return askId;
    }

    public void setAskId(Long askId) {
        this.askId = askId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }
}
